package cn.Service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import java.util.Date;

@Service
public class BootApplication {
    private  static  boolean isBoot = false;
    static int count = 1;
    @PostConstruct
    public void constructProc(){
        if(!isBoot) {
            System.out.println("boot application by @PostConstruct run count : " + (count++) + new Date().toString());
            isBoot=true;
        }
        System.out.println(" @PostConstruct run count :" + (count++) + new Date().toString());
    }
}
